package com.okq.service.Impl;

import com.okq.dao.LogisticsSheetDao;
import com.okq.entity.LogisticsSheet;
import com.okq.service.ILogisticsSheetService;
import com.okq.util.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 描述 : 物流单接口实现类
 * 作者 : zdl
 * 日期 : 2017/6/29 15:21
 */
@Transactional
@Service
public class LogisticsSheetServiceImpl implements ILogisticsSheetService {
    @Autowired
    private LogisticsSheetDao logisticsSheetDao;

    @Override
    public void saveLogisticsSheet(LogisticsSheet logisticsSheet) {
        logisticsSheetDao.saveLogisticsSheet(logisticsSheet);
    }

    @Override
    public void deleteLogisticsSheet(LogisticsSheet logisticsSheet) {
        logisticsSheetDao.deleteLogisticsSheet(logisticsSheet);
    }

    @Override
    public void updateLogisticsSheet(LogisticsSheet logisticsSheet) {
        logisticsSheetDao.updateLogisticsSheet(logisticsSheet);
    }

    @Override
    public void saveOrUpdateLogisticsSheet(LogisticsSheet logisticsSheet) {
        logisticsSheetDao.saveOrUpdateLogisticsSheet(logisticsSheet);
    }

    @Override
    public LogisticsSheet getLogisticsSheetById(String id) {
        return logisticsSheetDao.getLogisticsSheetById(id);
    }

    @Override
    public List<LogisticsSheet> listAllLogisticsSheet() {
        return logisticsSheetDao.listAllLogisticsSheet();
    }

    @Override
    public Page<LogisticsSheet> pageByLogisticsSheet(Page<LogisticsSheet> page, LogisticsSheet logisticsSheet) {
        return logisticsSheetDao.pageByLogisticsSheet(page, logisticsSheet);
    }

    @Override
    public LogisticsSheet getLogisticsSheetByCode(String productCode) {
        return logisticsSheetDao.getLogisticsSheetByCode(productCode);
    }
}
